<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
	<link rel="stylesheet" type="text/css" href="/static/css/hw-admin.css">

    <link rel="stylesheet" href="/static/css/lb.css"> 
    
    <style>
        #table-form td,th{
            text-align: center;
        }
        th,td,.name {
            text-align: center !important;
        }
        .hw-group table {
            width: 80% !important;
        }
        .copy {
            cursor: pointer;
        }
    
    </style>
   	<!--[if lt IE 9]>
    　 <script src="https://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
       <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.js"></script>
    <![endif]-->
</head>
<body>

	<div class="hw-iframe">
		<!-- 顶部标题 -->
        <div class="hw-header-wrapper">
            <div class="hw-header">
                <div class="hw-header__item--left">
                    发票详情
                </div>
            </div>
        </div>
        <div class="hw-group">
            <div class="group-title">基本信息</div>
            <div class="main-table-wrap" style="margin-top: 20px;"> 
                <table class="info-table"  border="0">  
                    <colgroup>
                        <col class="col-5"> 
                        <col class="col-15">
                        <col class="col-5"> 
                        <col class="col-15">
                    </colgroup>
                    <tbody>
                        <tr>
                            <td class="name">房间号</td>
                            <td><?=isset($roomNumber)?$roomNumber:''?></td>
                            <td class="name">订单号</td>
                            <td><?=isset($orderNumber)?$orderNumber:''?></td>
                        </tr>

                        <tr>
                            <td class="name">会员姓名</td>
                            <td><?=isset($member_name)?$member_name:''?></td>
                            <td class="name">会员身份证</td>
                            <td><?=isset($idNumber) ? substr_replace($this->unlock($idNumber), '******', 6, 8) : '' ?></td>
                        </tr>
                    </tbody>
                </table> 
            </div>
        </div>
        <div class="hw-group">
            <div class="group-title">发票信息</div>
            <div class="main-table-wrap" style="margin-top: 20px;"> 
                <table class="info-table"  border="0">  
                    <colgroup>
                        <col class="col-5"> 
                        <col class="col-15">
                        <col class="col-5"> 
                        <col class="col-15">
                    </colgroup>
                    <tbody>
                        <tr>
                            <td class="name">开票状态</td>
                            <td><?=$status==0?'待开票':'已开票'?></td>
                            <td class="name">发票类型</td>
                            <td><?=$type==0?'增值税专用发票':'普通发票'?></td>
                        </tr>

                        <tr>
                            <td class="name">发票抬头</td>
    <td><span><?=isset($rise)?$rise:''?></span><?php if(isset($rise) && $rise!=''){?><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                            <td class="name">税号</td>
                            <td><span><?=isset($duty_num)?$duty_num:''?></span><?php if(isset($duty_num) && $duty_num!=''){?><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                        </tr>

                        <tr>
                            <td class="name">基本开户银行</td>
                            <td><span><?=isset($open_bank)?$open_bank:''?></span><?php if(isset($open_bank) && $open_bank!=''){?><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                            <td class="name">基本开户账户</td>
                            <td><span><?=isset($open_account)?$open_account:''?></span><?php if(isset($open_account) && $open_account!=''){?><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                        </tr>
                        <tr>
                            <td class="name">注册场所地址</td>
                            <td><span><?=isset($register_address)?$register_address:''?></span><?php if(isset($register_address) && $register_address!=''){?><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                            <td class="name">注册固定电话</td>
                            <td><span><?=isset($register_phone)?$register_phone:''?></span><?php if(isset($register_phone) && $register_phone!=''){?><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                        </tr>
                        <tr>
                            <td class="name">发票内容</td>
                            <td><span><?=isset($detail)?$detail:''?><?php if(isset($detail) && $detail!=''){?></span><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                            <td class="name">发票金额</td>
                            <td><span><?=isset($price)?$price:''?></span><?php if(isset($price) && $price!=''){?><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                        </tr>
                        <tr>
                            <td class="name">备注</td>
                            <td><span><?=isset($note)?$note:''?></span><?php if(isset($note) && $note!=''){?><span style="float: right;margin-right: 5px;" class="blue-color copy">复制</span><?php }?></td>
                            <td style="background: #fff;border-left: 1px solid #e5e5e5;border-right: 1px solid #e5e5e5;" class="name"></td>
                            <td></td>
                        </tr>
                    </tbody>
                </table> 
            </div>
        </div>
        <div style="background: #fff;" class="group-operate">
            <div class="hw-container">
                <?php if($status == 0){?>
                <a style="margin-right: 20px;" class="hw-btn hw-default-btn" href="javascript:history.back(-1)">取消</a>
                <a class="hw-btn" style="color: #fff;" href="<?=base_url().'HotelAdmin/Invoice/invoiceFinish/'.$id?>">开票</a>
                <?php }else{?>
                    <a style="color: #fff;margin-right: 20px;" class="hw-btn hw-default-btn" href="<?=base_url().'HotelAdmin/Invoice/invoiceList?status=1'?>">返回</a>
                <?php }?>
            </div>
        </div>
	</div>







	<script src="/static/lib/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="/static/lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="/static/lib/jquery.form.min.js"></script>
    <script type="text/javascript" src="/static/js/common/util.js"></script>
	<script type="text/javascript" src="/static/js/common/upload.js"></script>
	<script type="text/javascript" src="/static/lib/jquery.validate.js"></script>
	<script type="text/javascript" src="/static/lib/messages_zh.js"></script>
	<script type="text/javascript" src="/static/js/common/validateExtend.js"></script>
	<script type="text/javascript" src="/static/js/common/common.js"></script>
    <!-- <script type="text/javascript" src="/static/lib/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="/static/lib/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript" src="/static/lib/ueditor/addCustomizeDialog.js"></script> -->
    <script>
        var imgModal = $('#img-modal');
        function createPreviewModal(url) {
        if(!url||url==''){
            return;
        }
        var str;
		if (imgModal.length > 0) {
			imgModal.find('.modal-body').find('img').attr('src', url);
			imgModal.removeClass('hide');
			return;
		} 

		str = '<div class="modal hide" id="img-modal">'+
				    '<div class="modal-mask"></div>'+
				    '<div class="modal-content">'+
				        '<div class="modal-header">'+
				            '<i class="iconfont" data-dismiss="modal">&#xe63d;</i>'+
				            '<div class="modal-title">图片预览</div>'+
				        '</div>'+
				        '<div class="modal-body">'+
				        	'<img class="preview-img-box" src="'+ url +'">'+
				        '</div>'+ 
				    '</div>'+
				'</div>';
		$('body').append(str);
		setTimeout(function() {
			imgModal = $('#img-modal');
			imgModal.removeClass('hide');
		}, 20);
	}
    function copyArticle(that) {
        const range = document.createRange();
        range.selectNode(that.prev()[0]);
        const selection = window.getSelection();
        if(selection.rangeCount > 0) selection.removeAllRanges();
        selection.addRange(range);
        document.execCommand('copy');
        $.alert("复制成功！");
    }
    $('.copy').on('click',function(){
        var that = $(this);
        copyArticle(that);
    })
    </script>
</body>
</html>